import mongoose from 'mongoose'

// 商品表
const schema = new mongoose.Schema({
    // 商品名称
    goodsName: {
      type: String,
      required: true,
      unique: false
    },
    // 型号
    type: {
      type: String,
      required: true,
      unique: false
    },
    // 型号
    unit: {
      type: String,
      required: true,
      unique: false
    },
    // 手机号
    phone: {
      type: Number,
      required: true,
      unique: false
    },
    // 备注
    remarks: {
      type: String,
      required: true,
      unique: false
    }
}, {
    // 日期
    timestamps: {
        createdAt: 'createTime',
        updatedAt: 'updateTime'
    }
})

export default mongoose.model('goods', schema)